using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VMKAPR
    {
        public DataRow Convert2MKAPR(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryMKAPR(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["MKRMANDANT"] = " ".PadRight(2 ); 
         dwReturn["MKRART"] = " ".PadRight(1 ); 
         dwReturn["MKRAUFKRS"] = " ".PadRight(2 ); 
         dwReturn["MKRAUFLFD"] = " ".PadRight(6 ); 
         dwReturn["MKRAUFPOS"] = " ".PadRight(3 ); 
         dwReturn["MKRAFOLGE"] = " ".PadRight(3 ); 
         dwReturn["MKRANZABT"] = " ".PadRight(2 ); 
         dwReturn["MKRKART"] = " ".PadRight(1 ); 
         dwReturn["MKRJJJJMM"] = " ".PadRight(0 ); 
         dwReturn["MKRAENDZL"] = " ".PadRight(0 ); 
         dwReturn["MKRAART"] = " ".PadRight(1 ); 
         dwReturn["MKRPKSTKRS"] = " ".PadRight(2 ); 
         dwReturn["MKRPKST"] = " ".PadRight(4 ); 
         dwReturn["MKRKARTR"] = " ".PadRight(1 ); 
         dwReturn["MKRMTYP"] = " ".PadRight(8 ); 
         dwReturn["MKRRSTA"] = " ".PadRight(1 ); 
         dwReturn["MKRNRKRS"] = " ".PadRight(2 ); 
         dwReturn["MKRLFDNR"] = " ".PadRight(4 ); 
         dwReturn["MKRPOS"] = " ".PadRight(2 ); 
         dwReturn["MKRQUA"] = " ".PadRight(6 ); 
         dwReturn["MKRSSDAT"] = " ".PadRight(8 ); 
         dwReturn["MKRSSUHR"] = " ".PadRight(4 ); 
         dwReturn["MKRFSDAT"] = " ".PadRight(0 ); 
         dwReturn["MKRANZTAG"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL1"] = " ".PadRight(0 ); 
         dwReturn["MKRRU1"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL2"] = " ".PadRight(0 ); 
         dwReturn["MKRRU2"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL3"] = " ".PadRight(0 ); 
         dwReturn["MKRRU3"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL4"] = " ".PadRight(0 ); 
         dwReturn["MKRRU4"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL5"] = " ".PadRight(0 ); 
         dwReturn["MKRRU5"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL6"] = " ".PadRight(0 ); 
         dwReturn["MKRRU6"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL7"] = " ".PadRight(0 ); 
         dwReturn["MKRRU7"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL8"] = " ".PadRight(0 ); 
         dwReturn["MKRRU8"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL9"] = " ".PadRight(0 ); 
         dwReturn["MKRRU9"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL10"] = " ".PadRight(0 ); 
         dwReturn["MKRRU10"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL11"] = " ".PadRight(0 ); 
         dwReturn["MKRRU11"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL12"] = " ".PadRight(0 ); 
         dwReturn["MKRRU12"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL13"] = " ".PadRight(0 ); 
         dwReturn["MKRRU13"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL14"] = " ".PadRight(0 ); 
         dwReturn["MKRRU14"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL15"] = " ".PadRight(0 ); 
         dwReturn["MKRRU15"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL16"] = " ".PadRight(0 ); 
         dwReturn["MKRRU16"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL17"] = " ".PadRight(0 ); 
         dwReturn["MKRRU17"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL18"] = " ".PadRight(0 ); 
         dwReturn["MKRRU18"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL19"] = " ".PadRight(0 ); 
         dwReturn["MKRRU19"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL20"] = " ".PadRight(0 ); 
         dwReturn["MKRRU20"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL21"] = " ".PadRight(0 ); 
         dwReturn["MKRRU21"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL22"] = " ".PadRight(0 ); 
         dwReturn["MKRRU22"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL23"] = " ".PadRight(0 ); 
         dwReturn["MKRRU23"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL24"] = " ".PadRight(0 ); 
         dwReturn["MKRRU24"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL25"] = " ".PadRight(0 ); 
         dwReturn["MKRRU25"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL26"] = " ".PadRight(0 ); 
         dwReturn["MKRRU26"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL27"] = " ".PadRight(0 ); 
         dwReturn["MKRRU27"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL28"] = " ".PadRight(0 ); 
         dwReturn["MKRRU28"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL29"] = " ".PadRight(0 ); 
         dwReturn["MKRRU29"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL30"] = " ".PadRight(0 ); 
         dwReturn["MKRRU30"] = " ".PadRight(0 ); 
         dwReturn["MKRBEL31"] = " ".PadRight(0 ); 
         dwReturn["MKRRU31"] = " ".PadRight(0 ); 
         dwReturn["MKRFILLER"] = " ".PadRight(13 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapMKAPR(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveMKAPR(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryMKAPR(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapMKAPR(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertMKAPR(dwLocal, ITXDBVERSION);
            }
            UpdateMKAPR(dwLocal);
        }
        public void InsertMKAPR(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO MKAPR(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryMKAPR(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM MKAPR WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM MKAPR  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "MKAPR";
            Return = Result;
            return Return;
        }
        public void DeleteMKAPR(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM MKAPR   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateMKAPR(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE MKAPR SET "
                    +"MKRMANDANT= :MKRMANDANT,"
                    +"MKRART= :MKRART,"
                    +"MKRAUFKRS= :MKRAUFKRS,"
                    +"MKRAUFLFD= :MKRAUFLFD,"
                    +"MKRAUFPOS= :MKRAUFPOS,"
                    +"MKRAFOLGE= :MKRAFOLGE,"
                    +"MKRANZABT= :MKRANZABT,"
                    +"MKRKART= :MKRKART,"
                    +"MKRJJJJMM= :MKRJJJJMM,"
                    +"MKRAENDZL= :MKRAENDZL,"
                    +"MKRAART= :MKRAART,"
                    +"MKRPKSTKRS= :MKRPKSTKRS,"
                    +"MKRPKST= :MKRPKST,"
                    +"MKRKARTR= :MKRKARTR,"
                    +"MKRMTYP= :MKRMTYP,"
                    +"MKRRSTA= :MKRRSTA,"
                    +"MKRNRKRS= :MKRNRKRS,"
                    +"MKRLFDNR= :MKRLFDNR,"
                    +"MKRPOS= :MKRPOS,"
                    +"MKRQUA= :MKRQUA,"
                    +"MKRSSDAT= :MKRSSDAT,"
                    +"MKRSSUHR= :MKRSSUHR,"
                    +"MKRFSDAT= :MKRFSDAT,"
                    +"MKRANZTAG= :MKRANZTAG,"
                    +"MKRBEL1= :MKRBEL1,"
                    +"MKRRU1= :MKRRU1,"
                    +"MKRBEL2= :MKRBEL2,"
                    +"MKRRU2= :MKRRU2,"
                    +"MKRBEL3= :MKRBEL3,"
                    +"MKRRU3= :MKRRU3,"
                    +"MKRBEL4= :MKRBEL4,"
                    +"MKRRU4= :MKRRU4,"
                    +"MKRBEL5= :MKRBEL5,"
                    +"MKRRU5= :MKRRU5,"
                    +"MKRBEL6= :MKRBEL6,"
                    +"MKRRU6= :MKRRU6,"
                    +"MKRBEL7= :MKRBEL7,"
                    +"MKRRU7= :MKRRU7,"
                    +"MKRBEL8= :MKRBEL8,"
                    +"MKRRU8= :MKRRU8,"
                    +"MKRBEL9= :MKRBEL9,"
                    +"MKRRU9= :MKRRU9,"
                    +"MKRBEL10= :MKRBEL10,"
                    +"MKRRU10= :MKRRU10,"
                    +"MKRBEL11= :MKRBEL11,"
                    +"MKRRU11= :MKRRU11,"
                    +"MKRBEL12= :MKRBEL12,"
                    +"MKRRU12= :MKRRU12,"
                    +"MKRBEL13= :MKRBEL13,"
                    +"MKRRU13= :MKRRU13,"
                    +"MKRBEL14= :MKRBEL14,"
                    +"MKRRU14= :MKRRU14,"
                    +"MKRBEL15= :MKRBEL15,"
                    +"MKRRU15= :MKRRU15,"
                    +"MKRBEL16= :MKRBEL16,"
                    +"MKRRU16= :MKRRU16,"
                    +"MKRBEL17= :MKRBEL17,"
                    +"MKRRU17= :MKRRU17,"
                    +"MKRBEL18= :MKRBEL18,"
                    +"MKRRU18= :MKRRU18,"
                    +"MKRBEL19= :MKRBEL19,"
                    +"MKRRU19= :MKRRU19,"
                    +"MKRBEL20= :MKRBEL20,"
                    +"MKRRU20= :MKRRU20,"
                    +"MKRBEL21= :MKRBEL21,"
                    +"MKRRU21= :MKRRU21,"
                    +"MKRBEL22= :MKRBEL22,"
                    +"MKRRU22= :MKRRU22,"
                    +"MKRBEL23= :MKRBEL23,"
                    +"MKRRU23= :MKRRU23,"
                    +"MKRBEL24= :MKRBEL24,"
                    +"MKRRU24= :MKRRU24,"
                    +"MKRBEL25= :MKRBEL25,"
                    +"MKRRU25= :MKRRU25,"
                    +"MKRBEL26= :MKRBEL26,"
                    +"MKRRU26= :MKRRU26,"
                    +"MKRBEL27= :MKRBEL27,"
                    +"MKRRU27= :MKRRU27,"
                    +"MKRBEL28= :MKRBEL28,"
                    +"MKRRU28= :MKRRU28,"
                    +"MKRBEL29= :MKRBEL29,"
                    +"MKRRU29= :MKRRU29,"
                    +"MKRBEL30= :MKRBEL30,"
                    +"MKRRU30= :MKRRU30,"
                    +"MKRBEL31= :MKRBEL31,"
                    +"MKRRU31= :MKRRU31,"
                    +"MKRFILLER= :MKRFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("MKRMANDANT", OracleType.NVarChar).Value = dwData["MKRMANDANT"].ToString(); 
          or1.Parameters.Add("MKRART", OracleType.NVarChar).Value = dwData["MKRART"].ToString(); 
          or1.Parameters.Add("MKRAUFKRS", OracleType.NVarChar).Value = dwData["MKRAUFKRS"].ToString(); 
          or1.Parameters.Add("MKRAUFLFD", OracleType.NVarChar).Value = dwData["MKRAUFLFD"].ToString(); 
          or1.Parameters.Add("MKRAUFPOS", OracleType.NVarChar).Value = dwData["MKRAUFPOS"].ToString(); 
          or1.Parameters.Add("MKRAFOLGE", OracleType.NVarChar).Value = dwData["MKRAFOLGE"].ToString(); 
          or1.Parameters.Add("MKRANZABT", OracleType.NVarChar).Value = dwData["MKRANZABT"].ToString(); 
          or1.Parameters.Add("MKRKART", OracleType.NVarChar).Value = dwData["MKRKART"].ToString(); 
          or1.Parameters.Add("MKRJJJJMM", OracleType.NVarChar).Value = dwData["MKRJJJJMM"].ToString(); 
          or1.Parameters.Add("MKRAENDZL", OracleType.NVarChar).Value = dwData["MKRAENDZL"].ToString(); 
          or1.Parameters.Add("MKRAART", OracleType.NVarChar).Value = dwData["MKRAART"].ToString(); 
          or1.Parameters.Add("MKRPKSTKRS", OracleType.NVarChar).Value = dwData["MKRPKSTKRS"].ToString(); 
          or1.Parameters.Add("MKRPKST", OracleType.NVarChar).Value = dwData["MKRPKST"].ToString(); 
          or1.Parameters.Add("MKRKARTR", OracleType.NVarChar).Value = dwData["MKRKARTR"].ToString(); 
          or1.Parameters.Add("MKRMTYP", OracleType.NVarChar).Value = dwData["MKRMTYP"].ToString(); 
          or1.Parameters.Add("MKRRSTA", OracleType.NVarChar).Value = dwData["MKRRSTA"].ToString(); 
          or1.Parameters.Add("MKRNRKRS", OracleType.NVarChar).Value = dwData["MKRNRKRS"].ToString(); 
          or1.Parameters.Add("MKRLFDNR", OracleType.NVarChar).Value = dwData["MKRLFDNR"].ToString(); 
          or1.Parameters.Add("MKRPOS", OracleType.NVarChar).Value = dwData["MKRPOS"].ToString(); 
          or1.Parameters.Add("MKRQUA", OracleType.NVarChar).Value = dwData["MKRQUA"].ToString(); 
          or1.Parameters.Add("MKRSSDAT", OracleType.NVarChar).Value = dwData["MKRSSDAT"].ToString(); 
          or1.Parameters.Add("MKRSSUHR", OracleType.NVarChar).Value = dwData["MKRSSUHR"].ToString(); 
          or1.Parameters.Add("MKRFSDAT", OracleType.NVarChar).Value = dwData["MKRFSDAT"].ToString(); 
          or1.Parameters.Add("MKRANZTAG", OracleType.NVarChar).Value = dwData["MKRANZTAG"].ToString(); 
          or1.Parameters.Add("MKRBEL1", OracleType.NVarChar).Value = dwData["MKRBEL1"].ToString(); 
          or1.Parameters.Add("MKRRU1", OracleType.NVarChar).Value = dwData["MKRRU1"].ToString(); 
          or1.Parameters.Add("MKRBEL2", OracleType.NVarChar).Value = dwData["MKRBEL2"].ToString(); 
          or1.Parameters.Add("MKRRU2", OracleType.NVarChar).Value = dwData["MKRRU2"].ToString(); 
          or1.Parameters.Add("MKRBEL3", OracleType.NVarChar).Value = dwData["MKRBEL3"].ToString(); 
          or1.Parameters.Add("MKRRU3", OracleType.NVarChar).Value = dwData["MKRRU3"].ToString(); 
          or1.Parameters.Add("MKRBEL4", OracleType.NVarChar).Value = dwData["MKRBEL4"].ToString(); 
          or1.Parameters.Add("MKRRU4", OracleType.NVarChar).Value = dwData["MKRRU4"].ToString(); 
          or1.Parameters.Add("MKRBEL5", OracleType.NVarChar).Value = dwData["MKRBEL5"].ToString(); 
          or1.Parameters.Add("MKRRU5", OracleType.NVarChar).Value = dwData["MKRRU5"].ToString(); 
          or1.Parameters.Add("MKRBEL6", OracleType.NVarChar).Value = dwData["MKRBEL6"].ToString(); 
          or1.Parameters.Add("MKRRU6", OracleType.NVarChar).Value = dwData["MKRRU6"].ToString(); 
          or1.Parameters.Add("MKRBEL7", OracleType.NVarChar).Value = dwData["MKRBEL7"].ToString(); 
          or1.Parameters.Add("MKRRU7", OracleType.NVarChar).Value = dwData["MKRRU7"].ToString(); 
          or1.Parameters.Add("MKRBEL8", OracleType.NVarChar).Value = dwData["MKRBEL8"].ToString(); 
          or1.Parameters.Add("MKRRU8", OracleType.NVarChar).Value = dwData["MKRRU8"].ToString(); 
          or1.Parameters.Add("MKRBEL9", OracleType.NVarChar).Value = dwData["MKRBEL9"].ToString(); 
          or1.Parameters.Add("MKRRU9", OracleType.NVarChar).Value = dwData["MKRRU9"].ToString(); 
          or1.Parameters.Add("MKRBEL10", OracleType.NVarChar).Value = dwData["MKRBEL10"].ToString(); 
          or1.Parameters.Add("MKRRU10", OracleType.NVarChar).Value = dwData["MKRRU10"].ToString(); 
          or1.Parameters.Add("MKRBEL11", OracleType.NVarChar).Value = dwData["MKRBEL11"].ToString(); 
          or1.Parameters.Add("MKRRU11", OracleType.NVarChar).Value = dwData["MKRRU11"].ToString(); 
          or1.Parameters.Add("MKRBEL12", OracleType.NVarChar).Value = dwData["MKRBEL12"].ToString(); 
          or1.Parameters.Add("MKRRU12", OracleType.NVarChar).Value = dwData["MKRRU12"].ToString(); 
          or1.Parameters.Add("MKRBEL13", OracleType.NVarChar).Value = dwData["MKRBEL13"].ToString(); 
          or1.Parameters.Add("MKRRU13", OracleType.NVarChar).Value = dwData["MKRRU13"].ToString(); 
          or1.Parameters.Add("MKRBEL14", OracleType.NVarChar).Value = dwData["MKRBEL14"].ToString(); 
          or1.Parameters.Add("MKRRU14", OracleType.NVarChar).Value = dwData["MKRRU14"].ToString(); 
          or1.Parameters.Add("MKRBEL15", OracleType.NVarChar).Value = dwData["MKRBEL15"].ToString(); 
          or1.Parameters.Add("MKRRU15", OracleType.NVarChar).Value = dwData["MKRRU15"].ToString(); 
          or1.Parameters.Add("MKRBEL16", OracleType.NVarChar).Value = dwData["MKRBEL16"].ToString(); 
          or1.Parameters.Add("MKRRU16", OracleType.NVarChar).Value = dwData["MKRRU16"].ToString(); 
          or1.Parameters.Add("MKRBEL17", OracleType.NVarChar).Value = dwData["MKRBEL17"].ToString(); 
          or1.Parameters.Add("MKRRU17", OracleType.NVarChar).Value = dwData["MKRRU17"].ToString(); 
          or1.Parameters.Add("MKRBEL18", OracleType.NVarChar).Value = dwData["MKRBEL18"].ToString(); 
          or1.Parameters.Add("MKRRU18", OracleType.NVarChar).Value = dwData["MKRRU18"].ToString(); 
          or1.Parameters.Add("MKRBEL19", OracleType.NVarChar).Value = dwData["MKRBEL19"].ToString(); 
          or1.Parameters.Add("MKRRU19", OracleType.NVarChar).Value = dwData["MKRRU19"].ToString(); 
          or1.Parameters.Add("MKRBEL20", OracleType.NVarChar).Value = dwData["MKRBEL20"].ToString(); 
          or1.Parameters.Add("MKRRU20", OracleType.NVarChar).Value = dwData["MKRRU20"].ToString(); 
          or1.Parameters.Add("MKRBEL21", OracleType.NVarChar).Value = dwData["MKRBEL21"].ToString(); 
          or1.Parameters.Add("MKRRU21", OracleType.NVarChar).Value = dwData["MKRRU21"].ToString(); 
          or1.Parameters.Add("MKRBEL22", OracleType.NVarChar).Value = dwData["MKRBEL22"].ToString(); 
          or1.Parameters.Add("MKRRU22", OracleType.NVarChar).Value = dwData["MKRRU22"].ToString(); 
          or1.Parameters.Add("MKRBEL23", OracleType.NVarChar).Value = dwData["MKRBEL23"].ToString(); 
          or1.Parameters.Add("MKRRU23", OracleType.NVarChar).Value = dwData["MKRRU23"].ToString(); 
          or1.Parameters.Add("MKRBEL24", OracleType.NVarChar).Value = dwData["MKRBEL24"].ToString(); 
          or1.Parameters.Add("MKRRU24", OracleType.NVarChar).Value = dwData["MKRRU24"].ToString(); 
          or1.Parameters.Add("MKRBEL25", OracleType.NVarChar).Value = dwData["MKRBEL25"].ToString(); 
          or1.Parameters.Add("MKRRU25", OracleType.NVarChar).Value = dwData["MKRRU25"].ToString(); 
          or1.Parameters.Add("MKRBEL26", OracleType.NVarChar).Value = dwData["MKRBEL26"].ToString(); 
          or1.Parameters.Add("MKRRU26", OracleType.NVarChar).Value = dwData["MKRRU26"].ToString(); 
          or1.Parameters.Add("MKRBEL27", OracleType.NVarChar).Value = dwData["MKRBEL27"].ToString(); 
          or1.Parameters.Add("MKRRU27", OracleType.NVarChar).Value = dwData["MKRRU27"].ToString(); 
          or1.Parameters.Add("MKRBEL28", OracleType.NVarChar).Value = dwData["MKRBEL28"].ToString(); 
          or1.Parameters.Add("MKRRU28", OracleType.NVarChar).Value = dwData["MKRRU28"].ToString(); 
          or1.Parameters.Add("MKRBEL29", OracleType.NVarChar).Value = dwData["MKRBEL29"].ToString(); 
          or1.Parameters.Add("MKRRU29", OracleType.NVarChar).Value = dwData["MKRRU29"].ToString(); 
          or1.Parameters.Add("MKRBEL30", OracleType.NVarChar).Value = dwData["MKRBEL30"].ToString(); 
          or1.Parameters.Add("MKRRU30", OracleType.NVarChar).Value = dwData["MKRRU30"].ToString(); 
          or1.Parameters.Add("MKRBEL31", OracleType.NVarChar).Value = dwData["MKRBEL31"].ToString(); 
          or1.Parameters.Add("MKRRU31", OracleType.NVarChar).Value = dwData["MKRRU31"].ToString(); 
          or1.Parameters.Add("MKRFILLER", OracleType.NVarChar).Value = dwData["MKRFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
